﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x0200033A RID: 826
	public class TPTNodeList<T> : TParseTreeNode, IEnumerator<T>, IDisposable, IEnumerator
	{
		// Token: 0x060021DD RID: 8669 RVA: 0x0033465A File Offset: 0x0033285A
		public void Reset()
		{
			this.iteratorpos = -1;
		}

		// Token: 0x060021DE RID: 8670 RVA: 0x00334663 File Offset: 0x00332863
		public void Dispose()
		{
		}

		// Token: 0x170006EC RID: 1772
		// (get) Token: 0x060021DF RID: 8671 RVA: 0x00334665 File Offset: 0x00332865
		public T Current
		{
			get
			{
				return this.curNode;
			}
		}

		// Token: 0x170006ED RID: 1773
		// (get) Token: 0x060021E0 RID: 8672 RVA: 0x0033466D File Offset: 0x0033286D
		object IEnumerator.Current
		{
			get
			{
				return this.Current;
			}
		}

		// Token: 0x060021E1 RID: 8673 RVA: 0x0033467C File Offset: 0x0033287C
		public bool MoveNext()
		{
			int num = this.iteratorpos + 1;
			this.iteratorpos = num;
			if (num >= this.v.Count)
			{
				return false;
			}
			this.curNode = (T)((object)this.v[this.iteratorpos]);
			return true;
		}

		// Token: 0x060021E3 RID: 8675 RVA: 0x003346E0 File Offset: 0x003328E0
		public int size()
		{
			return this.v.Count;
		}

		// Token: 0x060021E4 RID: 8676 RVA: 0x003346ED File Offset: 0x003328ED
		public virtual T elementAt(int index)
		{
			return (T)((object)this.v[index]);
		}

		// Token: 0x060021E5 RID: 8677 RVA: 0x00334700 File Offset: 0x00332900
		public void addElement(T ptn)
		{
			this.v.Add(ptn);
		}

		// Token: 0x060021E6 RID: 8678 RVA: 0x00334714 File Offset: 0x00332914
		public void removeElementAt(int index)
		{
			this.v.RemoveAt(index);
		}

		// Token: 0x060021E7 RID: 8679 RVA: 0x00334722 File Offset: 0x00332922
		public void removeElement(T ptn)
		{
			this.v.Remove(ptn);
		}

		// Token: 0x060021E8 RID: 8680 RVA: 0x00334735 File Offset: 0x00332935
		internal void remove(int index)
		{
			this.v.Remove(index);
		}

		// Token: 0x060021E9 RID: 8681 RVA: 0x00334748 File Offset: 0x00332948
		internal int indexOf(T ptn)
		{
			return this.v.IndexOf(ptn);
		}

		// Token: 0x060021EA RID: 8682 RVA: 0x0033475B File Offset: 0x0033295B
		internal void setElementAt(T ptn, int index)
		{
			this.v[index] = ptn;
		}

		// Token: 0x060021EB RID: 8683 RVA: 0x0033476F File Offset: 0x0033296F
		internal void removeAllElements()
		{
			this.v.Clear();
		}

		// Token: 0x060021EC RID: 8684 RVA: 0x0033477C File Offset: 0x0033297C
		public void insertElementAt(T ptn, int index)
		{
			this.v.Insert(index, ptn);
		}

		// Token: 0x060021ED RID: 8685 RVA: 0x00334790 File Offset: 0x00332990
		public override void init(object arg1)
		{
			if (arg1 != null)
			{
				this.addParseTreeNode((T)((object)arg1));
			}
		}

		// Token: 0x060021EE RID: 8686 RVA: 0x003347A1 File Offset: 0x003329A1
		internal virtual void addParseTreeNode(T arg1)
		{
			this.addElement(arg1);
		}

		// Token: 0x060021EF RID: 8687 RVA: 0x003347AA File Offset: 0x003329AA
		public virtual void addNode(T arg1)
		{
			this.addParseTreeNode(arg1);
		}

		// Token: 0x060021F0 RID: 8688 RVA: 0x003347B3 File Offset: 0x003329B3
		public virtual T getElement(int index)
		{
			return this.elementAt(index);
		}

		// Token: 0x060021F1 RID: 8689 RVA: 0x003347BC File Offset: 0x003329BC
		public virtual void appendList(TPTNodeList<T> pList)
		{
			for (int i = 0; i < pList.size(); i++)
			{
				this.addElement(pList.getElement(i));
			}
		}

		// Token: 0x060021F2 RID: 8690 RVA: 0x003347E8 File Offset: 0x003329E8
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			for (int i = 0; i < this.size(); i++)
			{
				T t = this.elementAt(i);
			}
		}

		// Token: 0x060021F3 RID: 8691 RVA: 0x00334813 File Offset: 0x00332A13
		public override TSourceToken getStartToken()
		{
			this.size();
			return null;
		}

		// Token: 0x060021F4 RID: 8692 RVA: 0x0033481D File Offset: 0x00332A1D
		public override TSourceToken getEndToken()
		{
			this.size();
			return null;
		}

		// Token: 0x04001AC8 RID: 6856
		private T curNode;

		// Token: 0x04001AC9 RID: 6857
		private int iteratorpos = -1;

		// Token: 0x04001ACA RID: 6858
		private ArrayList v = new ArrayList();
	}
}
